Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@keegangeorge
Copy link
Member

This PR fixes an issue where the AI search results were not being reset when you append your search to an existing query param (typically when you've come from quick search). This is because handleSearch() doesn't get called in this situation. So here we explicitly check for query params, trigger a reset and search for those occasions. Testing needs to be improved quite a bit here so I will address it in a follow-up PR.

This PR fixes an issue where the AI search results were not being reset when you append your search to an existing query param (typically when you've come from quick search). This is because `handleSearch()` doesn't get called in this situation. So here we explicitly check for query params, trigger a reset and search for those occasions. Testing needs to be improved quite a bit here so I will address it in a follow-up PR.
Comment on lines -26 to +28
@tracked AIResults = [];
@tracked showingAIResults = false;
@tracked AiResults = [];
@tracked showingAiResults = false;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sneaking in a small change to make sure AI respects camelCase as we do so throughout the rest of the plugin.

<DToggleSwitch
disabled={{this.disableToggleSwitch}}
@state={{this.showingAIResults}}
title="AI search results hidden"
Copy link
Member Author

@keegangeorge keegangeorge Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

title is not really necessary here as we show these details in this.searchStateText below, plus this should be localized anyway if it's used.

@keegangeorge keegangeorge merged commit f75b13c into main Nov 13, 2024
6 checks passed
@keegangeorge keegangeorge deleted the fix-search-from-full-page branch November 13, 2024 15:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants